<%--@elvariable id="duties" type="java.lang.string"--%>
<%--@elvariable id="user" type="com.weitu.permission.user.entity.user"--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="utf-8" %>
<!doctype html>
<html lang="zh">
<head>
    <title>用户编辑</title>
    <%@include file="/common/header.jspf" %>
    <script type="text/javascript" src="${ctx}/resources/js/permission/user/edit.js"></script>
</head>
<body>
<div class="form-wrap">
    <form id="form_user" method="post">
        <div class="input-wrap">
            <label class="label-top">用户名:</label>
            <input class="easyui-textbox" type="text" name="name" data-options="required:true,readonly:true" value="${user.name}">
        </div>
        <div class="input-wrap">
            <label class="label-top">姓名:</label>
            <input class="easyui-textbox" type="text" name="realName" data-options="required:true" value="${user.realName}">
        </div>
        <div class="input-wrap">
            <label class="label-top">用户编号:</label>
            <input class="easyui-textbox" type="text" name="code" data-options="required:true" value="${user.code}">
        </div>
        <div class="input-wrap">
            <label class="label-top">岗位:</label>
            <select class="easyui-combobox" id="post_combo" name="postId"></select>
        </div>
        <div class="input-wrap">
            <label class="label-top">职位:</label>
            <select class="easyui-combotree" id="duty" name="dutyId"></select>
        </div>
        <div class="input-wrap">
            <label class="label-top">启用状态:</label>
            <select class="easyui-combobox" name="useState" data-options="required:true,editable:false,selectOnNavigation:true">
                <option value="1" <c:if test="${user.useState==1}">selected="selected"</c:if>>启用</option>
                <option value="0" <c:if test="${user.useState==0}">selected="selected"</c:if>>未启用</option>
            </select>
        </div>
        <div class="input-wrap">
            <label class="label-top">排序号:</label>
            <input class="easyui-numberspinner" type="text" name="sort" data-options="precision:0" value="${user.sort}">
        </div>
        <div class="input-wrap">
            <label class="label-top">备注:</label>
            <input class="easyui-textbox" type="text" name="remarks" style="height: 100px;" data-options="multiline:true" value="${user.remarks}">
        </div>
        <div class="input-wrap hide">
            <input type="hidden" name="id" value="${user.id}">
            <c:forEach var="userDepartment" items="${user.userDepartmentList}">
                <input type="hidden" name="userDepartment" value="${userDepartment.deptId}">
            </c:forEach>
            <input type="hidden" name="deptId" value="${param.deptId}">
            <input type="hidden" name="duties" value="${duties}">
            <input type="hidden" name="oldPostId" value="${user.postId}">
        </div>
    </form>
    <div class="form-button">
        <a id="btn_save" href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'fa fa-save fa-lg'">保存</a>
    </div>
</div>
</body>
</html>